package org.jeeasy.system.modules.role.domian;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.dromara.autotable.annotation.mysql.MysqlTypeConstant;
import org.dromara.mpe.autotable.annotation.Column;
import org.dromara.mpe.autotable.annotation.Table;
import org.jeeasy.common.core.annotation.dict.Dict;
import org.jeeasy.common.core.base.BaseEntity;
import org.jeeasy.common.core.enums.EnableFlagEnum;

/**
 * @author AlpsDDJ
 * @date 2020/11/10
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@Table(value = "sys_role", comment = "系统角色")
public class SysRole extends BaseEntity<SysRole> {

    @Column(comment = "角色名称", length = 32)
    private String roleName;

    @Column(comment = "角色标识", length = 32)
    private String roleCode;

    @Column(comment = "启用标记", length = 1, type = MysqlTypeConstant.TINYINT, defaultValue = "1")
    @Dict(dictEnum = EnableFlagEnum.class)
    private Integer enableFlag;

    @Column(comment = "备注", length = 255)
    private String remark;

    @Column(comment = "描述", length = 255)
    private String description;

    @Column(comment = "排序", length = 4, decimalLength = 2)
    private Double sortNo;

}
